<div class="show interest">
    <form name="apply" class="apply" action="{:U('index/apply')}" method="post">
        <input type="hidden" name="activityId" value="0"/>
        <input type="hidden" name="activityType" value="0"/>
        <div class="info_box">
            <div class="input_box"><input type="text" placeholder="姓名" name="username"/>
                <img class="err-img hide" src="__STATIC__images/error-image.png"/>
            </div>
            <span class="error_info hide">姓名不能为空</span>
        </div>
        <div class="info_box">
            <div class="input_box"><input type="text" placeholder="学员年龄" name="age"/>
                <img class="err-img hide" src="__STATIC__images/error-image.png"/>
            </div>
            <span class="error_info hide">请填写正确的年龄</span>
        </div>

        <div class="info_box tips_set">
            <div class="input_box"><input type="text" placeholder="手机号码" name="mobile"/><img class="err-img hide" src="__STATIC__images/error-image.png"/><i class="sprite sprite-tips"></i></div>

            <div class="tips_con">我们遵守保密协定，不会将您的信息泄露给他人
                <span class="sprite sprite-arrow"></span></div>
            <span class="error_info hide">只能包含11位数字，不能包含空格或符号，例如：13767114126</span>
        </div>
        <div class="info_box tips_set email_set">
            <div class="input_box"><input type="text" placeholder="电子邮件" name="email"/><img class="err-img hide" src="__STATIC__images/error-image.png"/><i class="sprite sprite-tips"></i></div>
            <div class="tips_con">我们遵守保密协定，不会将您的信息泄露给他人<span class="sprite sprite-arrow"></span></div>
            <span class="error_info hide">只能填写有效电子邮件地址，例如：qwert@sanyi.org</span>
        </div>
        <button type="submit">免费参加活动</button>
    </form>
</div>
<script src="__STATIC__dialog/dist/dialog-min.js"></script>
<link rel="stylesheet" href="__STATIC__dialog/css/ui-dialog.css">

<script type="text/javascript">
    $('.apply').submit(function(){
        $.ajax({
            type: "post",
            url: $('form[name="apply"]').attr('action'),
            data:$('form[name="apply"]').serialize(),
            dataType: "json",
            success: function(data){
                if(data.status == 0){
                    dialog_msg(data.info);
                    return false;
                }else if(data.status == 1){
                    dialog_msg(data.info);
                }
            }
        });
        return false;
    });
</script>